package com.sctvcloud.linshui.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.ruihang.generalibrary.ui.adapter.BaseHolderAbsAdapter;
import com.ruihang.generalibrary.ui.util.OnItemInternalClick;
import com.sctvcloud.linshui.R;
import com.sctvcloud.linshui.beans.GalleryBean;
import com.sctvcloud.linshui.ui.adapter.holder.GalleryHolder;


import java.util.List;

/**
 * Created by Administrator on 2017/7/17 0017.
 */

public class GalleryAdapter extends BaseHolderAbsAdapter<GalleryBean, GalleryHolder> {
    public GalleryAdapter(Context context, List<GalleryBean> list) {
        super(context, list);
    }

    @Override
    public GalleryHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.item_gallery, parent, false);
        GalleryHolder holder = new GalleryHolder(context, view);
        holder.setInternalClick(this);
        return holder;
    }

    @Override
    public GalleryAdapter setItemInternalClick(OnItemInternalClick itemInternalClick) {
        super.setItemInternalClick(itemInternalClick);
        return this;
    }
}
